The following terms are used in this specification, and have the following general definitions.
Assembler program: A low-level computer program written in assembler code. It is closely related to the computer's central processing unit or system architecture.
Low-level program: Not easily readable by human, but, it is easily readable by the machine.
High-level program: Easy to read by humans and has rich features of data structure, library routines to aid in programming, and provides many control structures.
Assembler parser program: A program which parses the assembler code and generates the memory image file, which will be used as an input data for validating the CPU.
Macros or Macro processor: A programming feature to expand a given text string into other text string. It can be used to expand from smaller text string to larger text string, to perform arithmetic operations, and to include text string based upon conditions. The cpp and M4 programs, available as part of the UNIX operating system, are two examples of macro processors.
In the development of various types of integrated circuits, a validation step is required in order to test the integrated circuit for proper functionality under a wide variety of conditions. For example, with various input signals applied to an integrated circuit, appropriate output signals are expected. In complex integrated circuits, the required output signals are not only related to the current state of the input signals, but are typically related to a history of input signals which have previously been received, and which establishes a particular set of states within the integrated circuit, including the contents of various registers and buffers. In a microprocessor development project, validation engineers are required to write assembler code of length ranges from hundreds to several thousand lines of assembler code. Smaller programs may be easy to write manually, but it is quite difficult and time consuming to write larger lengths of assembler code, e.g. more than two hundred lines of assembler code.
In the prior art, the step required to manually write large lengths of assembler code is either done entirely manually, or cpp and M4 macros are used to help in writing the large assembler code. However, the use of macros is undesirable due to the following disadvantages.
Macros are complex to use for writing large assembler code as macros are not meant for this purpose. Macros are generally used to substitute small text string with that of another small text string. The primary purpose of macros is to port from one programming environment to another. PA1 Macros do not have very good control and looping features in comparison with that of high-level languages. PA1 Macros do not have as many built-in or library functions as compared with high-level languages such as `C`. PA1 Generally people are not familiar with Macros. PA1 1) Write some part of the assembler code manually. PA1 2) Use high-level language to generate part of the code as a separate file. PA1 3) Insert generated assembly code during manual generation of assembler code. PA1 4) Repeat steps 2 and 3 as many times as required. PA1 5) Prepare and file assembler file.
Another prior art method of writing large lengths of assembler code involves the use of a high level language program to generate certain portions of the assembler code. This high level language is used external to the environment in which the assembler code is written, and the high level language is executed to generate assembler code which is then manually pasted into the appropriate location of the assembler code which is manually written. Thus, the following steps are used in this prior art process of utilizing high level language to generate part of the assembler code.
While the prior art method (of utilizing high level language to generate part of the assembler code can result in a significant time savings as compared with completely creating entire assembler code manually (which might take on the order of five to ten times the time required to generate assembler code utilizing high level code), there remains a number of disadvantages. First, this prior art method requires multiple iterations of time consuming manual work in order to write the high level code, execute it to generate assembler code, and to paste the assembler code into appropriate locations of the assembler code being manually generated. Furthermore, the high level source code is required to be storeodas a separate file and executed-as a separate file, making organization complex. Also, the final,assembler code file size is large, as no file size savings is achieved utilizing the high level code since the high level code is simply used to generate part of the file assembler code file. Also, this prior art technique does not make it easy to affect changes to the assembler code, since the assembler code itself must be manually changed, or a large part of the assembler code properly determined and removed, the high level language used to generate that part of the assembler code revised and reexecuted, with the resultant revised assembler code pasted in the proper location of the final assembler code file.
Thus, even though there are tools available to assembler code programmers to assist them in generating large assembler code files, it is still time consuming, error prone, and somewhat clumsy.